#ifndef _MASTER_H_
#define _MASTER_H_

#include "EventProcessor.h"
#include "EventProcessorImp.h"
#include "Message.h"
#include "DistributedCounter.h"
#include "TwoWayList.h"

using namespace std;



class MasterImp : public EventProcessorImp {
private:

  int p1, p2;	  

  MasterImp();
	
  EventProcessor Player1;

  void PlayAgain(EventProcessor& sender);
	
  void MakeDecision(int p2, EventProcessor& sender);	  	

  MESSAGE_HANDLER_DECLARATION(ChoiceMade);
	
  MESSAGE_HANDLER_DECLARATION(GameOver);

  MESSAGE_HANDLER_DECLARATION(Die);

  friend class Master;
};

// Interface class
class Master : public EventProcessor {
public:
  Master();
};

inline Master::Master(){
	evProc = new MasterImp();
}

#endif 
